import request from '@/utils/request';
// request.defaults.timeout = 30000

// 获取配置的小程序&公众号
export const getConfigOAAndMP = (data: any, noNeedLoading = false) => {
    return request({
        url: '/scrm-api/console/media/content/get-offical-mini',
        method: 'POST',
        data,
        noNeedLoading
    });
};

// 配置内容模块小程序&公众号
export const setOAAndMP = (data: any) => {
    return request({
        url: '/scrm-api/console/media/content/set-offical-mini',
        method: 'POST',
        data
    });
};

// 获取分享设置
export const getSettingShare = (data: any, noNeedLoading = false) => {
    return request({
        url: '/scrm-api/console/media/content/get-setting-share',
        method: 'POST',
        data,
        noNeedLoading
    });
};

// 设置分享标题&描述
export const settingShareText = (data: any) => {
    return request({
        url: '/scrm-api/console/media/content/share-setting',
        method: 'POST',
        data
    });
};

// 设置封面图
export const settingShareImage = (data: any) => {
    return request({
        url: '/scrm-api/console/media/content/set-share-cover',
        method: 'POST',
        data
    });
};

// 生成分享二维码&链接
export const generateRadarShare = (data: any) => {
    return request({
        url: '/scrm-api/console/media/content/generate-radar-share',
        method: 'POST',
        data
    });
};

/**
 * 分流码-获取配置公众号
 * @param data
 * @returns
 */
export function mediaTypeOffiCalMini(data: any, noNeedLoading = false) {
    return request({
        url: '/scrm-api/console/media/content/mediatype-offical-mini',
        method: 'post',
        data,
        noNeedLoading
    });
}
